package com.ins.service.impl;


import com.ins.mapper.AppRevenueMapper;
import com.ins.model.entity.AppRevenue;
import com.ins.model.query.Query;
import com.ins.model.vo.AppRevenueVO;
import com.ins.service.AppRevenueService;
import com.mybatisflex.core.paginate.Page;
import com.mybatisflex.spring.service.impl.ServiceImpl;
import org.dromara.hutool.core.bean.BeanUtil;
import org.springframework.stereotype.Service;

/**
 * 收益记录 服务层实现。
 *
 * @author ins
 * @since 2024-05-14
 */
@Service
public class AppRevenueServiceImpl extends ServiceImpl<AppRevenueMapper, AppRevenue> implements AppRevenueService {

    @Override
    public Page<AppRevenueVO> pages(Query query) {
        return this.page(Page.of(query.getPage(), query.getLimit())).map(a -> BeanUtil.copyProperties(a, AppRevenueVO.class));
    }
}